home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Especial Multimedia
/
Especial Multimedia.iso
/
Multimed
/
Prg
/
WAVPLUS.ZIP
/
WAVPLUS2.BA_
/
WAVPLUS2.BA
Wrap
Text File
|
1997-09-14
|
13KB
|
208 lines
'WavPlus2.DLL should be in your Windows\System directory or in the Path
'Assorted functions
Declare Function GetWavPlusVersion% Lib "WavPlus2.DLL" ()
'returns the version number * 100, version 2.0 returns 200
Declare Sub RevString Lib "WavPlus2.DLL" (ByVal ReturnString$)
'reverses the character sequence of a string (useful for a reverse InStr)
'WAV functions (non-MCI)
Declare Function PlayWavWait% Lib "WavPlus2.DLL" (ByVal FullPath$)
'plays the specified WAV and waits until completion
Declare Function PlayWavNoWait% Lib "WavPlus2.DLL" (ByVal FullPath$)
'starts the specified WAV and returns immediately
Declare Function PlayWavLoop% Lib "WavPlus2.DLL" (ByVal FullPath$)
'plays the specified WAV in a continuous loop
Declare Function StopWavLoop% Lib "WavPlus2.DLL" ()
'stops any asynchronous (non-waiting) WAV file from playing
Declare Function HowManyWavPlayDevices% Lib "WavPlus2.DLL" ()
'returns the number of WAV playing devices (0 = none)
Declare Function HowManyWavRecordDevices% Lib "WavPlus2.DLL" ()
'returns the number of WAV recording devices (0 = none)
Declare Function PlayWav% Lib "WavPlus2.DLL" (ByVal WavName$, ByVal wait%)
'multi-purpose routine to play system sounds, wav files, and determine if the system WAV capable
'set Wait% to 0 (FALSE) to play a WAV file asynchronously (without waiting for completion)
'set Wait% to -1 (TRUE) to play a WAV file synchronously (waiting until completion to return control to the system);
'Wait% ONLY has an effect if WavName$ is the full path of a WAV file
'WavName$ can be one of several strings
'WavName$ system sounds: (if no sound card is available, these will beep the PC speaker)
'(these sounds always return -1, TRUE)
' "asterisk" = system asterisk sound
' "beep" = system default beep sound
' "critical stop" = system critical stop sound
' "default' = system default beep sound
' "exclamation" = system exclamation sound
' "question = system question sound
' "stop" = system critical stop sound
'WavName$ functions:
' "available" = returns -1 (TRUE) if the system is WAV capable, returns 0 (FALSE) otherwise
' "silence" = stops any asynchronous WAV that is currently playing (always returns -1, TRUE)
'when WavName$ is the full path of a WAV file, it will be played using Wait% to determine synchronicity
'when WavName$ is the full path of a WAV file, the return value will be -1 (TRUE) if is started okay, 0 (FALSE) otherwise
'WAV info functions (mci)
Declare Sub WavManufacturer Lib "WavPlus2.DLL" (ByVal ReturnString$)
'determines the manufacturer of the sound card ("invalid" on error)
Declare Function WavVersion% Lib "WavPlus2.DLL" ()
'returns the Sound Driver version (0=invalid); version is minor*100+major
Declare Function WavVolumeSupported% Lib "WavPlus2.DLL" ()
'returns -1 (TRUE) if volume control support; return 0 (FALSE) otherwise
Declare Sub WavCanPlay Lib "WavPlus2.DLL" (ByVal ReturnString$)
'determines if the system can play WAV files
'returns "true" if capable; returns "false" otherwise
'before calling, set ReturnString$=space$(255)
'after calling, use trim$(TrimAtNull(ReturnString$))) to obtain answer
Declare Sub WavCanRecord Lib "WavPlus2.DLL" (ByVal ReturnString$)
'determines if the system can record WAV files
'returns "true" if capable; returns "false" otherwise
'before calling, set ReturnString$=space$(255)
'after calling, use trim$(TrimAtNull(ReturnString$))) to obtain answer
Declare Sub WavMaxBitSize Lib "WavPlus2.DLL" (ByVal ReturnString$)
'determines the maximum bit size supported by the system
'returns "8" or "16"
'before calling, set ReturnString$=space$(255)
'after calling, use trim$(TrimAtNull(ReturnString$))) to obtain answer
Declare Sub WavMaxChannels Lib "WavPlus2.DLL" (ByVal ReturnString$)
'determines the maximum channels supported by the system
'returns "mono" or "stereo"
'before calling, set ReturnString$=space$(255)
'after calling, use trim$(TrimAtNull(ReturnString$))) to obtain answer
Declare Sub WavMaxSampleRate Lib "WavPlus2.DLL" (ByVal ReturnString$)
'determines the Maximum sample rate supported by the system
'returns "11025", "22050", or "44100"
'before calling, set ReturnString$=space$(255)
'after calling, use trim$(TrimAtNull(ReturnString$))) to obtain answer
Declare Sub WavGetLengthMS Lib "WavPlus2.DLL" (ByVal FullPath$, ByVal ReturnString$)
'determines the length in milliseconds of the specified file
'before calling, set ReturnString$=space$(255)
'after calling, use trim$(TrimAtNull(ReturnString$))) to obtain answer
Declare Sub WavGetLengthBytes Lib "WavPlus2.DLL" (ByVal FullPath$, ByVal ReturnString$)
'determines the length in bytes of the specified file
'before calling, set ReturnString$=space$(255)
'after calling, use trim$(TrimAtNull(ReturnString$))) to obtain answer
Declare Sub WavGetBitSize Lib "WavPlus2.DLL" (ByVal FullPath$, ByVal ReturnString$)
'determines the bit size of the specified file ("8" or "16")
'before calling, set ReturnString$=space$(255)
'after calling, use trim$(TrimAtNull(ReturnString$))) to obtain answer
Declare Sub WavGetChannels Lib "WavPlus2.DLL" (ByVal FullPath$, ByVal ReturnString$)
'determines the number of channels of the specified file ("mono" or "stereo")
'before calling, set ReturnString$=space$(255)
'after calling, use trim$(TrimAtNull(ReturnString$))) to obtain answer
Declare Sub WavGetSampleRate Lib "WavPlus2.DLL" (ByVal FullPath$, ByVal ReturnString$)
'determines the sample rate of the specified file (typically returns "11025", "22050", or "44100")
'before calling, set ReturnString$=space$(255)
'after calling, use trim$(TrimAtNull(ReturnString$))) to obtain answer
'WAV functions (mci)
'with each of these functions, the file must first be opened with
'WavOpen. ReturnString$ will contain any possible error message or
'the requested information
Declare Sub WavOpen Lib "WavPlus2.DLL" (ByVal FullPath$, ByVal ReturnString$)
Declare Sub WavOpenNew Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub WavClose Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub WavPause Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub WavResume Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub WavStop Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub WavStart Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub WavStartSectionWait Lib "WavPlus2.DLL" (ByVal lpSecStart$, ByVal lpSecEnd$, ByVal ReturnString$)
Declare Sub WavStartSectionNoWait Lib "WavPlus2.DLL" (ByVal lpSecStart$, ByVal lpSecEnd$, ByVal ReturnString$)
Declare Sub WavSeekEnd Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub WavSeekStart Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub WavSeekPosition Lib "WavPlus2.DLL" (ByVal lpStrValue$, ByVal ReturnString$)
Declare Sub WavStatusMode Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub WavStatusLengthMS Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub WavStatusLengthBytes Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub WavStatusPosition Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub WavStatusBitSize Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub WavStatusChannels Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub WavStatusSampleRate Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub WavRecord Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub WavSave Lib "WavPlus2.DLL" (ByVal lpFileName$, ByVal ReturnString$)
Declare Sub WavEraseAll Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub WavEraseSection Lib "WavPlus2.DLL" (ByVal lpSecStart$, ByVal lpSecEnd$, ByVal ReturnString$)
Declare Sub WavSetBitSize Lib "WavPlus2.DLL" (ByVal lpValue$, ByVal ReturnString$)
Declare Sub WavSetChannels Lib "WavPlus2.DLL" (ByVal lpValue$, ByVal ReturnString$)
Declare Sub WavSetSampleRate Lib "WavPlus2.DLL" (ByVal lpValue$, ByVal ReturnString$)
'MIDI info functions
Declare Function HowManyMidiPlayDevices% Lib "WavPlus2.DLL" ()
'returns the number Midi playing devices (0=none)
Declare Function HowManyMidiRecordDevices% Lib "WavPlus2.DLL" ()
'returns the number Midi recording devices (0-none)
'MCI Midi open session functions
'with each of these functions, the file must first be opened with
'MidiOpen. ReturnString$ will contain any possible error message or
'the requested information
Declare Sub MidiOpen Lib "WavPlus2.DLL" (ByVal lpFileName$, ByVal ReturnString$)
Declare Sub MidiOpenNew Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub MidiClose Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub MidiPause Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub MidiResume Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub MidiStop Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub MidiStart Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub MidiStartSectionWait Lib "WavPlus2.DLL" (ByVal lpSecStart$, ByVal lpSecEnd$, ByVal ReturnString$)
Declare Sub MidiStartSectionNoWait Lib "WavPlus2.DLL" (ByVal lpSecStart$, ByVal lpSecEnd$, ByVal ReturnString$)
Declare Sub MidiSeekEnd Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub MidiSeekStart Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub MidiSeekPosition Lib "WavPlus2.DLL" (ByVal lpStrValue$, ByVal ReturnString$)
Declare Sub MidiStatusMode Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub MidiStatusLengthMS Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub MidiStatusPosition Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub MidiRecord Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub MidiSave Lib "WavPlus2.DLL" (ByVal lpFileName$, ByVal ReturnString$)
Declare Sub MidiEraseAll Lib "WavPlus2.DLL" (ByVal ReturnString$)
Declare Sub MidiEraseSection Lib "WavPlus2.DLL" (ByVal lpSecStart$, ByVal lpSecEnd$, ByVal ReturnString$)
'CD audio functions (most functions return an empty string on error)
Declare Sub CDstatusTracks Lib "WavPlus2.DLL" (ByVal ReturnString$)
'returns the number of tracks on the CD
'on data (non-musical) CD's this will return "1"
'before calling, set ReturnString$=space$(255)
'after calling, use val(trim$(TrimAtNull(ReturnString$))) to obtain track count
Declare Sub CDstatusMode Lib "WavPlus2.DLL" (ByVal ReturnString$)
'returns the current status of the CD audio device:
' not ready, open, paused, playing, seeking, or stopped
'before calling, set ReturnString$=space$(255)
'after calling, use trim$(TrimAtNull(ReturnString$)) to obtain mode
Declare Sub CDstatusCurrentTrack Lib "WavPlus2.DLL" (ByVal ReturnString$)
'returns the number of the current track on the CD
'before calling, set ReturnString$=space$(255)
'after calling, use val(trim$(TrimAtNull(ReturnString$))) to obtain current track
Declare Sub CDstatusTrackLength Lib "WavPlus2.DLL" (ByVal ReturnString$, ByVal TrackNbr%)
'returns the length (mm:ss:ms) specified track on the CD
'TrackNbr is the track number
'before calling, set ReturnString$=space$(255)
'after calling, use trim$(TrimAtNull(ReturnString$)) to obtain track's length
Declare Sub CDstatusInserted Lib "WavPlus2.DLL" (ByVal ReturnString$)
'returns the word "true" if CD is in drive, else it returns "false"
'before calling, set ReturnString$=space$(255)
'after calling, use trim$(TrimAtNull(ReturnString$)) to obtain answer
Declare Sub CDstatusPosition Lib "WavPlus2.DLL" (ByVal ReturnString$)
'returns the current position (track:mm:ss:ms) of the CD
'before calling, set ReturnString$=space$(255)
'after calling, use trim$(TrimAtNull(ReturnString$)) to obtain answer
Declare Sub CDpause Lib "WavPlus2.DLL" (ByVal ReturnString$)
'pauses a CD audio session (with some drivers this is the same as stop)
'before calling, set ReturnString$=space$(255)
'after calling, use trim$(TrimAtNull(ReturnString$)) will contain any possible error
Declare Sub CDresume Lib "WavPlus2.DLL" (ByVal ReturnString$)
'resumes a CD audio session (with some drivers this has no effect)
'before calling, set ReturnString$=space$(255)
'after calling, use trim$(TrimAtNull(ReturnString$)) will contain any possible error
Declare Sub CDstop Lib "WavPlus2.DLL" (ByVal ReturnString$)
'stops a CD audio session
'before calling, set ReturnString$=space$(255)
'after calling, use trim$(TrimAtNull(ReturnString$)) will contain any possible error
Declare Sub CDplay Lib "WavPlus2.DLL" (ByVal ReturnString$, ByVal Track%)
'begins a CD audio session
'Track% is the track to play (0 = all tracks)
'before calling, set ReturnString$=space$(255)
'after calling, use trim$(TrimAtNull(ReturnString$)) will contain any possible error
Declare Sub CDgoto Lib "WavPlus2.DLL" (ByVal ReturnString$, ByVal Track%)
'moves to the specified track on the CD
'Track% is the track to relocate to
'before calling, set ReturnString$=space$(255)
'after calling, use trim$(TrimAtNull(ReturnString$)) will contain any possible error